﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using SZSLSystem.Model;
using SZSLSystem.DAL;

namespace SZSLSystem.BLL
{
    /// <summary>
    /// 业务逻辑层：组织用户
    /// </summary>
    public partial class OrganizationUser
    {
        private readonly SZSLSystem.DAL.OrganizationUser dal = new DAL.OrganizationUser();

        public OrganizationUser()
        {

        }

        #region  Method

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(Guid Id)
        {
            return dal.Exists(Id);
        }

        /// <summary>
        /// 返回数据总数(分页用到)
        /// </summary>
        public int GetCount(string strWhere)
        {
            return dal.GetCount(strWhere);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(SZSLSystem.Model.OrganizationUser model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(SZSLSystem.Model.OrganizationUser model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(Guid Id)
        {
            return dal.Delete(Id);
        }

        public bool DeletebyUserID(Guid Id)
        {
            return dal.DeletebyUserID(Id);
        }

        /// <summary>
        /// 根据商品编号获取数据
        /// </summary>
        public SZSLSystem.Model.OrganizationUser GetModel(Guid Id)
        {
            return dal.GetModel(Id);
        }

        public SZSLSystem.Model.OrganizationUser GetModelbyUserID(Guid Id)
        {
            return dal.GetModelbyUserID(Id);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return dal.GetList(Top, strWhere, filedOrder);
        }

        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetPageList(int pageSize, int currentPage, string strWhere, string filedOrder)
        {
            return dal.GetPageList(pageSize, currentPage, strWhere, filedOrder);
        }

        #endregion  Method
    }
}
